import request from '@/utils/request'

export default {
    //查询学院信息
    getDepartments(current, limit, departmentDto) {

        return request({
            url: `/api/department/pageDepartment/${current}/${limit}`,
            method: 'post',
            data: departmentDto
        })
    },
    //添加学院
    addDepartment(addDepartmentDto) {
        return request({
            url: `/api/department/addDepartment`,
            method: 'post',
            data: addDepartmentDto
        })
    },
    //查询单个学院信息
    getDepartmentByCode(departmentCode) {
        return request({
            url: `/api/department/getDepartmentByCode/${departmentCode}`,
            method: 'get'
        })
    },
    //修改学院信息
    updateDepartment(sysDepartment) {
        return request({
            url: `/api/department/updateDepartment`,
            method: 'post',
            data: sysDepartment
        })
    },
    //删除学院
    delDepartment(departmentCode) {
        return request({
            url: `/api/department/delDepartment/${departmentCode}`,
            method: 'delete'
        })
    },
    //---------------------------------------------------------------
    //查询专业信息
    pageProfessional(current, limit, professionalDto) {
        return request({
            url: `/api/professional/pageProfessional/${current}/${limit}`,
            method: 'post',
            data: professionalDto
        })
    },
    //查询所有学院信息
    findAllDepartment() {
        return request({
            url: `/api/department/findAllDepartment`,
            method: 'get'
        })
    },
    //添加专业信息
    addProfessional(professionalDto) {
        return request({
            url: `/api/professional/addProfessional`,
            method: 'post',
            data: professionalDto
        })
    },
    //查询单个专业信息
    getProfessionalByCode(professionalCode) {
        return request({
            url: `/api/professional/getProfessionalByCode/${professionalCode}`,
            method: 'get'
        })
    },
    //修改专业信息
    updateProfessional(sysProfessional) {
        return request({
            url: `/api/professional/updateProfessional`,
            method: 'post',
            data: sysProfessional
        })
    },
    //删除专业
    delProfessional(professionalCode) {
        return request({
            url: `/api/professional/delProfessional/${professionalCode}`,
            method: 'delete'
        })
    },
    //---------------------------------------------------------------
    //查询专业信息
    pageClassInfo(current, limit, classInfoDto) {
        return request({
            url: `/api/classinfo/pageClassInfo/${current}/${limit}`,
            method: 'post',
            data: classInfoDto
        })
    },

    //模糊查询按学院专业一二级分类
    getClassLevel() {
        return request({
            url: `/api/classinfo/getClassLevel`,
            method: 'get'
        })

    },

    //添加班级信息
    addClassInfo(addClassDto) {
        return request({
            url: `/api/classinfo/addClassInfo`,
            method: 'post',
            data: addClassDto
        })
    },

    //查询一个班级信息
    getClassInfoById(id) {
        return request({
            url: `/api/classinfo/getClassInfoById/${id}`,
            method: 'get'
        })
    },

    //修改班级信息
    updateClassInfo(sysProfessional) {
        return request({
            url: `/api/classinfo/updateClassInfo`,
            method: 'post',
            data: sysProfessional
        })
    },

    //删除班级
    delClassInfo(id) {
        return request({
            url: `/api/classinfo/delClassInfo/${id}`,
            method: 'delete'
        })
    },
    //根据专业名获取所有讲师
    getTeacherByProfessionalName(professionalName){
        return request({
            url: `/api/teacher/getTeacherByProfessionalName/${professionalName}`,
            method: 'get'
        })
    },
    //添加或修改管理教师
    addTeacherManage(teacherManage){
        return request({
            url: `/api/classinfo/addTeacherManage/`,
            method: 'post',
            data:teacherManage
        })
    },
    //根据年级专业获取班级信息
    getClassCode(hiredate,professionalName){
        return request({
            url: `/api/classinfo/getClassCode/${hiredate}/${professionalName}`,
            method: 'get'
        })
    },
    //---------------------------------------------------------------
    //查询教室信息
    pageRoom(current, limit, roomDto) {
        return request({
            url: `/api/room/pageRoom/${current}/${limit}`,
            method: 'post',
            data:roomDto
        })
    },
    //添加教室
    addRoom(roomDto){
        return request({
            url: `/api/room/addRoom`,
            method: 'post',
            data:roomDto
        })
    },
    //查询一个教室信息
    getRoomById(id){
        return request({
            url: `/api/room/getRoomById/${id}`,
            method: 'get'
        })
    },
    updateRoom(sysRoom){
        return request({
            url: `/api/room/updateRoom`,
            method: 'post',
            data:sysRoom
        })
    },
    //删除教室
    delRoom(id){
        return request({
            url: `/api/room/delRoom/${id}`,
            method: 'delete'
        })
    },
    //查询所有教室
    getAllRoom(){
        return request({
            url: `/api/room/getAllRoom`,
            method: 'get'
        })
    }




}

